package cn.glutnn.auth.application.entity;

import lombok.Getter;

@Getter
public enum AuthUserEnum {
    OPEN(0, "启用"),
    CLOSE(1, "禁用");

    private Integer code;
    private String desc;

    AuthUserEnum(Integer code, String message) {
        this.code = code;
        this.desc = message;
    }

    public static AuthUserEnum getByCode(int codeValue) {
        for (AuthUserEnum item : AuthUserEnum.values()) {
            if (item.code == codeValue) {
                return item;
            }
        }
        return null;
    }

}
